//	Node.h	-	Node class
//	Stores and returns information pertaining to a node on a graph.
//	Point name, X position, Y position, pointers to connected nodes.

#ifndef NODE_H
#define NODE_H
#include <string>
#include <QString>
#include <QVector>
#include <QDebug>
#include <vector>

class Node
{
public:
    Node(void);
    Node(QString, int, int);
	~Node(void);

    QString getName(void) const;
	int getX(void) const;
	int getY(void) const;
	Node* getParent(void) const;
	int getF(void) const;
	std::vector<Node*> getConnections(void) const;

	void addConnection(Node*);
	void setParent(Node*);
	void setF(int);

	void inOpenList(bool);
	bool inOpenList(void) const;
	void inClosedList(bool);
	bool inClosedList(void) const;

	void print(void) const;

private:
    const QString name;
    const int x;
    const int y;
    Node* parent;
	int f;
	bool open;
	bool closed;

	std::vector<Node*> connections;
};
#endif
